-- sharp
-- created by zhuangsl
-- 锋锐状态

return {
    fetchProps = function(who, status, condition)
        local props    = {};
        local endRound = condition["end_round"];

        -- 攻击百分比提升
        local propId = PropM.getPropId("attrib");
        local value  = condition["attack"];
        table.insert(props, { propId, "attack", value, endRound, });

        -- 概率不受反击
        propId = PropM.getPropId("cant_be_attack");
        value  = condition["cant_be_attack"];
        table.insert(props, { propId, 1, value, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 攻击提升
        local value = condition["attack"];
        value = math.modf(value / 10);
        desc = string.gsub(desc, "{attack}", value);

        -- 概率不受反击
        value = condition["cant_be_attack"];
        value = math.modf(value / 10);
        desc = string.gsub(desc, "{rate}", value);

        return desc;
    end,
};
